﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ProtocolVN.Framework.Win
{
    public class RBTienThanhToan:RangBuocRule
    {
        public decimal TongTien;
        public decimal DaThanhToan;

        public RBTienThanhToan() { }

        public RBTienThanhToan(decimal TongTien,decimal DaThanhToan)
        {
            this.TongTien = TongTien;
            this.DaThanhToan = DaThanhToan;
        }
        #region RangBuocRule Members

        public List<InvalidInfo> Check()
        {
            List<InvalidInfo> ret = new List<InvalidInfo>();
            if (TongTien != null && DaThanhToan != null)
            {
                if ((TongTien - DaThanhToan) == 0)
                {
                    ret.Add(new InvalidInfo(
                        "Phiếu này đã thanh toán hết",".......",InvalidInfo.InvalidType.ERROR
                        ));
                }
            }
            return ret;
        }

        #endregion
    }
}
